/*
 *   Copyright (c) 2010-2022, SIUFUNG
 */
package net.siufung.market.base.permit.controller.model.vo;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import net.siufung.core.model.AbstractVo;

import java.time.LocalDateTime;

/**
 * @author 陈建峰
 * @since 2022-07-05 22:19:50
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="PermitVo", description="系统权限表")
public class PermitVo extends AbstractVo {

    private static final long serialVersionUID = 249705243711344361L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    private Integer id;

    /**
     * 权限名称
     */
    @ApiModelProperty(value = "权限名称")
    private String permitName;

    /**
     * 权限编码
     */
    @ApiModelProperty(value = "权限编码")
    private String permitCode;

    /**
     * 父级外键
     */
    @ApiModelProperty(value = "父级外键")
    private Integer parentId;

    /**
     * 菜单外键
     */
    @ApiModelProperty(value = "菜单外键")
    private Integer menuId;

    /**
     * 菜单类型
     */
    @ApiModelProperty(value = "菜单类型")
    private String menuType;

    /**
     * 菜单外键
     */
    @ApiModelProperty(value = "菜单外键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long appId;

    /**
     * 显示文本
     */
    @ApiModelProperty(value = "显示文本")
    private String text;

    /**
     * 权限类型
     */
    @ApiModelProperty(value = "权限类型")
    private String permitType;

    /**
     * 权限url
     */
    @ApiModelProperty(value = "权限url")
    private String linkUrl;

    /**
     * 权限方法
     */
    @ApiModelProperty(value = "权限方法")
    private String method;

    /**
     * 权限标识
     */
    @ApiModelProperty(value = "权限标识")
    private String sign;

    /**
     * 权限描述
     */
    @ApiModelProperty(value = "权限描述")
    private String description;

    /**
     * 权限排序
     */
    @ApiModelProperty(value = "权限排序")
    private Integer sequence;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createdBy;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    private LocalDateTime createdAt;

    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updatedBy;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    private LocalDateTime updatedAt;

    /**
     * 数据标识
     */
    @ApiModelProperty(value = "数据标识")
    private Boolean deleted;

}